// Copyright 2012. InMobi. All Rights reserved

package com.inmobi.sharedlock;

/**
 *
 */
public class BenchRunner implements Runnable {

  private final AverageCalculator averageCalculator;

  public BenchRunner(AverageCalculator averageCalculator) {
    this.averageCalculator = averageCalculator;
  }

  @Override
  public void run() {
    for (long counter = 0; counter < 10000; ++counter) {
      averageCalculator.addValue(counter % 10);
      ++counter;
    }
  }
}
